home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / WMS.CAB / wmslogoff.asp < prev    next >
Encoding:
Text File  |  2003-02-21  |  4.9 KB  |  166 lines

  1. <%@ Language=VBScript CODEPAGE=65001 %>
  2. <!--#include file="wmssecure/include/wmsConstants.inc"-->
  3. <!--#include file="wmssecure/include/wmsLocStrings.inc"-->
  4. <!--#include file="wmssecure/include/wmsServerHash.inc"-->
  5. <!--#include file="wmssecure/include/wmsconnect.inc"-->
  6. <!--#include file="wmssecure/include/wmsCommon.inc"-->
  7. <!--#include file="wmssecure/include/wmsHeader.inc"--> 
  8. <% 
  9. '+-------------------------------------------------------------------------
  10. '
  11. '  Microsoft Windows Media
  12. '  Copyright (C) Microsoft Corporation. All rights reserved.
  13. '
  14. '  File:       WMSLogOff.asp
  15. '
  16. '  Contents:    Exit screen
  17. '
  18. '--------------------------------------------------------------------------
  19.  
  20. Dim bCloseOnLoad
  21. bCloseOnLoad = CBool( 0 < Len( Request.QueryString( "close" ) ) )
  22. BrowserSniff
  23.  
  24. WriteHTMLHeader( L_LOGOFF_TEXT ) %>
  25. <link rel="stylesheet" type="text/css" href="wmsStyles.css">
  26. <script language="JavaScript" src="/wmssecure/include/WMSCommon.js"></script>
  27. <script language="JavaScript">
  28. /*@cc_on @*/
  29. ////////////////////////////////////////////////////////////////
  30. function UseSingleFrame()
  31. {
  32. /*@if (@_jscript_version >= 1.3)
  33.     try 
  34.     {
  35. @end @*/
  36.     if( window.parent != window )
  37.     {
  38. <%
  39. if( brMSIE <> dwBrowserType ) then %>
  40.         parent.document.location = parent.document.location.protocol + "//" + parent.document.location.host + "/wmslogoff.asp?<%= RemoveDangerousCharacters( Request.QueryString() ) %>";
  41. <% else %>
  42.         document.parentWindow.parent.parent.location = document.parentWindow.parent.parent.location.protocol + "//" + document.parentWindow.parent.parent.location.host + "/wmslogoff.asp?<%= RemoveDangerousCharacters( Request.QueryString() ) %>";
  43. <% end if %>
  44.     }
  45. /*@if (@_jscript_version >= 1.3)
  46.     } 
  47.     catch( error )
  48.     {
  49.         return;
  50.     }
  51. @end @*/
  52. }
  53. ////////////////////////////////////////////////////////////////
  54. function CloseBrowserWindow()
  55. {
  56. /*@if (@_jscript_version >= 1.3)
  57.     try 
  58.     {
  59. @end @*/
  60.     window.close();
  61. /*@if (@_jscript_version >= 1.3)
  62.     } 
  63.     catch( error )
  64.     {
  65.         return;
  66.     }
  67. @end @*/
  68. }
  69. </script>
  70. </head>
  71. <body bgcolor="white" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" onload="JavaScript:UseSingleFrame();<% if bCloseOnLoad then %>CloseBrowserWindow();<% end if %>window.focus();">
  72. <br/>
  73. <table width="100%" bgcolor="white" cellpadding="0" cellspacing="0" border="0" ID="Table1">
  74. <tr>
  75.     <td width="10">
  76.          
  77.     </td>
  78.     <td width="220" height="40" align="left" valign="middle">
  79.         <img src="wmssecure/img/treebanner.gif" width="220" height="40" border="0">
  80.      </td>
  81.      <td align="center" valign="center">
  82.         <center><div class="servername"><%= Server.HTMLEncode( L_LOGOFFTITLE_TEXT ) %></div></center>
  83.      </td>
  84.      <td width="220" width="40" align="right">
  85.          
  86.      </td>
  87.     <td width="10" align="right">
  88.          
  89.     </td>
  90. </tr>
  91. </table>
  92. <br/>
  93. <table cellspacing="0" cellpadding="0" border="0" ID="Table3" width="100%">
  94. <tr>
  95.     <td width="10">
  96.           
  97.     </td>
  98.     <td colspan="2" width="99%">
  99.         <p>
  100.             <div class="useragent"><br>  <%= Request.ServerVariables( "HTTP_USER_AGENT" ) %><br> </div>
  101.         <p>
  102.             <div class="helptext"><%= Server.HTMLEncode( L_LOGOFFHELP_TEXT ) %>
  103.             </div>
  104.     </td>
  105. </tr>
  106. <tr>
  107.     <td>
  108.          
  109.     </td>
  110.     <td colspan="2">
  111.         <br>
  112.         <img src="/wmssecure/img/WMSSpacer.gif" width="2" height="14"> 
  113.     </td>
  114. </tr>
  115. <tr>
  116.     <td colspan="3" align="center">
  117.         <button title="<%= Server.HTMLEncode( L_CLOSEBTNHELP_TEXT ) %>" tabIndex="1" class="closebutton" onClick="JavaScript:CloseBrowserWindow();"><%= Server.HTMLEncode( L_CLOSEBTN_TEXT ) %></button>
  118.     </td>
  119. </tr>
  120. </table>
  121. </body>
  122. <script language="Javascript">
  123. /*@cc_on @*/
  124. /*@if (@_jscript_version >= 1.3)
  125.     try 
  126.     {
  127. @end @*/
  128.         UseSingleFrame();
  129. /*@if (@_jscript_version >= 1.3)
  130.     } 
  131.     catch( error )
  132.     {
  133.     }
  134. @end @*/
  135.  
  136. <%
  137.     Dim strProtocol
  138.     Dim strServer
  139.     Dim strPathInfo
  140.     Dim strUsername
  141.     strUsername = Server.HTMLEncode( Request.ServerVariables( "LOGON_USER" ) )
  142.     if( 0 = StrComp( "on", Request.ServerVariables( "HTTPS" ), vbTextCompare ) ) then
  143.         strProtocol = "https://" & strUsername & ":pass@"
  144.     else
  145.         strProtocol = "http://" & strUsername & ":pass@"
  146.     end if
  147. '    strProtocol = Request.ServerVariables( "PROTOCOL" )
  148.     strServer = Request.ServerVariables( "HTTP_HOST" )
  149.     strPathInfo = Request.ServerVariables( "PATH_INFO" )
  150. '    Response.Redirect( strProtocol & strServer & strPathInfo )
  151. %>
  152. </script>
  153. </html>
  154. <% 
  155. on error resume next
  156. Session.Timeout = 0
  157. Session.Abandon
  158.  
  159. Dim objSession
  160. Set objSession = Session( "CurSession" )
  161. objSession.Logoff
  162.  
  163. strProtocol = Request.ServerVariables( "PROTOCOL" )
  164. strServer = Request.ServerVariables( "HTTP_HOST" )
  165. strPathInfo = Request.ServerVariables( "PATH_INFO" )
  166. %>